import React from 'react'
import ReactDOM from 'react-dom'

import AppUI from './components/appui'
import {createStore}  from 'redux'
import {Counters} from './reudx/reducers'
const store=createStore(Counters)
console.log(store.getState())
ReactDOM.render(<AppUI store={store}/> , document.getElementById('root'))
store.subscribe(function(){  //监听store发生变化后重新去渲染dom组件
    ReactDOM.render(<AppUI store={store}/> , document.getElementById('root'))
})
